package wang.aweb.childcar.exception;

public enum CarExceptionEnum {
    NEED_USER_NAME(10001,"用户名不能为空"),
    NEED_PASSWORD(10002,"密码不能为空"),
    PASSWORD_TOO_SHORT(10003,"密码长度不能小于八位"),
    NAME_EXIST(10004,"不允许重名"),
    INSERT_FAILED(10005,"插入错误请重试"),
    WRONG_PARSSWORD(10006,"密码错误"),
    NEED_LOGIN(10007,"用户未登录"),
    UPDATE_FAILED(10008,"更新失败"),
    NEED_ADMIN(10009,"无管理员权限"),
    NAME_NOT_NULL(10010,"名称不能为空"),
    CREATE_FAILED(10011,"新增失败"),
    REQUEST_PARAM_ERROR(10012,"参数错误"),
    DELETE_FAILED(10013,"删除失败"),
    MKDIR_FAILED(10014,"目录创建失败"),
    UPLOAD_FAILED(10015,"图片上传失败"),
    NOT_SALE(10016,"商品不在售"),
    NOT_ENOUGH(10017,"商品库存不足"),
    CART_EMPTY(10018,"购物车已勾选的商品为空"),
    NO_ENUM(10019,"未找到对应的枚举"),
    NO_ORDER(10020,"订单不存在"),
    NOT_YOUR_ORDER(10021,"订单所属权有问题"),
    WRONG_ORDER_STATUS(10022,"订单状态不符"),
    WRONG_EMAIL(10023,"非法邮箱"),
    EMAIL_ALREADY_BEAN_REGISTE(10024,"邮箱已注册"),
    EMAIL_ALREADY_BEAN_SEND(10025,"邮箱已发送，若无法收到，请稍后再试"),
    NEED_EMAIL_ADDRESS(10026,"邮箱不能为空"),
    NEED_VERIFICATION_CODE(10027,"验证码不能为空"),
    WRONG_VERIFICATION_CODE(10028,"验证码错误"),
    TOKEN_EXPIRED(10029,"token过期"),
    TOKEN_WRONG(10030,"解析失败"),
    NEED_TOKEN(10031,"token不能为空"),
    IMEI_EXIST(10032,"主板号已存在"),
    ID_NULL(10033,"ID不能为空"),
    IMEI_ERROR(10034,"二维码错误"),
    DEVICE_NOT_ONLINE(10035,"设备不在线"),
    DEVICE_STATUS_ERROR(10036,"设备状态错误"),
    DEVICE_NO_FENCE(10037,"设备没有设置围栏信息"),
    MONEY_NOT_ENOTH(10038,"余额不足，请充值"),
    CODE_NULL(10039,"code不能为空"),
    AGENT_PASSWORD_ERROR(10040,"代理商密码错误"),
    ORDER_ALREADY_END(10041,"订单已经被关闭,请勿重复操作"),
    NEED_AGENT(10042,"您不是代理商"),
    MONEY_NOT_NULL(10043,"金额不能为空"),
    SYSTEM_ERROR(20000,"系统异常");





    /**
     * 异常码
     */
    Integer code;
    /**
     * 异常信息
     */
    String msg;

    CarExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
